<template>
    <div class="main">
        <el-row class="tac">
            <el-col :span="12">
                <el-menu
                        default-active="2"
                        class="el-menu-vertical-demo"
                        @open="handleOpen"
                        @close="handleClose"
                        background-color="#545c64"
                        text-color="#fff"
                        active-text-color="#ffd04b">
                    <div class="img_container">
                        <img :src='img_url' alt="">
                    </div>
                    <el-submenu index="1">
                        <template slot="title">
                            <i class="el-icon-location"></i>
                            <span>用户管理</span>
                        </template>
                        <el-menu-item-group>
                            <el-menu-item index="1-1">用户列表</el-menu-item>
                        </el-menu-item-group>
                    </el-submenu>
                    <el-submenu index="2">
                        <template slot="title">
                            <i class="el-icon-location"></i>
                            <span>商品管理</span>
                        </template>
                        <el-menu-item-group>
                            <el-menu-item index="2-1">商品列表</el-menu-item>
                            <el-menu-item index="2-2">分类参数</el-menu-item>
                            <el-menu-item index="2-3">商品分类</el-menu-item>
                        </el-menu-item-group>
                    </el-submenu>
                    <el-submenu index="3">
                        <template slot="title">
                            <i class="el-icon-document"></i>
                            <span>订单管理</span>
                        </template>
                        <el-menu-item-group>
                            <el-menu-item index="3-1">订单列表</el-menu-item>
                        </el-menu-item-group>
                    </el-submenu>
                    <el-submenu index="4">
                        <template slot="title">
                            <i class="el-icon-setting"></i>
                            <span>数据统计</span>
                        </template>
                        <el-menu-item-group>
                            <el-menu-item index="4-1">数据报表</el-menu-item>
                        </el-menu-item-group>
                    </el-submenu>

                </el-menu>
            </el-col>
        </el-row>
    </div>
</template>

<script>
    export default {
        methods: {
            handleOpen(key, keyPath) {
            },
            handleClose(key, keyPath) {
            },
        },
        data: function () {
            return {
                img_url: require('../assets/1.jpg')
            }
        }
    }



</script>

<style scoped>

    .main {
        left: 0;
        top: 0;
        height: 100vh;
        width: 500px;
    }

    ul {
        height: 100vh;
        width: 100%;
    }

    ul li {
        width: 100%;
    }

    .img_container {
        width: 100px;
        height: 100px;
        border-radius: 50%;
        border: 2px solid #fff;
        margin-top: 1.5vh;
    }

    .el-menu-vertical-demo {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    img {
        height: 100px;
        width: 100px;
        border-radius: 50%;
    }
</style>
